Compare File Size Ratio Live
Compare File Size Ratio Live (v1.0.0)
Compare either the estimated final size or current output size to the input size and give an error if estimated final size or current size falls outside the lower or upper threshold %.
Works with 'FfmpegCommand', 'HandBrake Custom Arguments', 'Run Classic Transcode' and other flow plugins that output a file.
Can be placed anywhere before a plugin which outputs a new file.
You can check if this plugin caused an error by using 'Check Flow Variable' and checking if {{{args.variables.liveSizeCompare.error}}} is true. The threshold that triggered the error (either 'upperThreshold' or 'lowerThreshold') is available at {{{args.variables.liveSizeCompare.errorType}}}.
Inputs:
Name: Enabled
Type: boolean
Tooltip:
Enable or disable this plugin. For example you may want to enable it for one transcoding block and then
disable it for another block.
Name: Compare Method
Type: string
Tooltip:
Specify the method to compare.
Estimated Final Size: Compare the estimated final output size to the input size.
Current Size: Compare the current output size to the input size.
Name: Upper Threshold Size %
Type: number
Tooltip:
Enter the upper threshold size percentage relative to the input size.
An error will be triggered (with errorType set to 'upperThreshold') if the estimated or current size exceeds
this percentage.
For example, if the input size is 100MB and the threshold is 60%, the estimated final size or current size
must not surpass 60MB else an error will be given and processing will stop.
Name: Lower Threshold Size %
Type: number
Tooltip:
Enter the lower threshold size percentage relative to the input size.
An error will be triggered (with errorType set to 'lowerThreshold') if the estimated final size falls below
this percentage.
For example, if the input size is 100MB and the lower threshold is 20%, an error will be given if
the estimated final size drops below 20MB.
Only applies to the 'estimatedFinalSize' compare method, since 'currentSize' starts at zero and
would always trip the lower bound. Set to 0 to disable.
Name: Check Delay (seconds)
Type: number
Tooltip:
Specify the delay in seconds before beginning the comparison.
A larger delay gives more time for the estimated final size to stabilize.
Outputs:
1: Continue to next plugin